/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/03/07
* File: Program.h
**/

#pragma once

#include "RenderObject.h"
#include "ProgramUniform.h"
#include "ProgramAttribute.h"
#include "VertexShader.h"
#include "PixelShader.h"

namespace HY
{
class Program : public RenderObject
{
public:
	virtual ~Program() {}

	virtual void bind() = 0;

	virtual void unbind() = 0;

	virtual VertexShader* getVertexShader() = 0;

	virtual bool setVertexShader(VertexShader* vs) = 0;

	virtual PixelShader* getPixelShader() = 0;

	virtual bool setPixelShader(PixelShader* ps) = 0;

	virtual ProgramAttribute* getAttribute(const std::string& name) = 0;

	virtual ProgramUniform* getUniform(const std::string& name) = 0;

	virtual void addUniform(const std::string& name, ProgramUniform* u) = 0;

	virtual void addAttribute(const std::string& name, ProgramAttribute* a) = 0;

protected:
	Program()
		: RenderObject(TypeProgram)
	{

	}
};

	
}